<template>
    <div v-if="placeholder" class="product-action-placeholder">
        <van-goods-action>
            <slot/>
        </van-goods-action>
    </div>
    <van-goods-action v-else>
        <slot/>
    </van-goods-action>
</template>

<script>
  import { GoodsAction } from "vant"

  export default {
    name: "ProductAction",
    components: {
      [GoodsAction.name]: GoodsAction,
    },
    props: {
      placeholder: {
        type: Boolean,
        default: true,
      },
    },
  }
</script>

<style scoped>
    .product-action-placeholder {
        height: 50px;
    }
</style>
